Optimal. Leaf size=108 \[ \frac{(g \tan (e+f x))^{p+1}}{a f g (p+1)}-\frac{\sec (e+f x) \cos ^2(e+f x)^{\frac{p+3}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac{p+2}{2},\frac{p+3}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{a f g^2 (p+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12612, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {2706, 2607, 32, 2617} \[ \frac{(g \tan (e+f x))^{p+1}}{a f g (p+1)}-\frac{\sec (e+f x) \cos ^2(e+f x)^{\frac{p+3}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac{p+2}{2},\frac{p+3}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{a f g^2 (p+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2706
Rule 2607
Rule 32
Rule 2617
Rubi steps
\begin{align*} \int \frac{(g \tan (e+f x))^p}{a+a \sin (e+f x)} \, dx &=\frac{\int \sec ^2(e+f x) (g \tan (e+f x))^p \, dx}{a}-\frac{\int \sec (e+f x) (g \tan (e+f x))^{1+p} \, dx}{a g}\\ &=-\frac{\cos ^2(e+f x)^{\frac{3+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{3+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)}+\frac{\operatorname{Subst}\left (\int (g x)^p \, dx,x,\tan (e+f x)\right )}{a f}\\ &=\frac{(g \tan (e+f x))^{1+p}}{a f g (1+p)}-\frac{\cos ^2(e+f x)^{\frac{3+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{3+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)}\\ \end{align*}
Mathematica [B] time = 4.03293, size = 232, normalized size = 2.15 \[ \frac{2 \tan \left (\frac{1}{2} (e+f x)\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2 (g \tan (e+f x))^p \left (\left (p^2+5 p+6\right ) \, _2F_1\left (\frac{p+1}{2},p+2;\frac{p+3}{2};\tan ^2\left (\frac{1}{2} (e+f x)\right )\right )-(p+1) \tan \left (\frac{1}{2} (e+f x)\right ) \left (2 (p+3) \, _2F_1\left (\frac{p+2}{2},p+2;\frac{p+4}{2};\tan ^2\left (\frac{1}{2} (e+f x)\right )\right )-(p+2) \tan \left (\frac{1}{2} (e+f x)\right ) \, _2F_1\left (p+2,\frac{p+3}{2};\frac{p+5}{2};\tan ^2\left (\frac{1}{2} (e+f x)\right )\right )\right )\right ) \left (\cos (e+f x) \sec ^2\left (\frac{1}{2} (e+f x)\right )\right )^p}{f (p+1) (p+2) (p+3) (a \sin (e+f x)+a)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.178, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( g\tan \left ( fx+e \right ) \right ) ^{p}}{a+a\sin \left ( fx+e \right ) }}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \tan \left (f x + e\right )\right )^{p}}{a \sin \left (f x + e\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\left (g \tan \left (f x + e\right )\right )^{p}}{a \sin \left (f x + e\right ) + a}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\left (g \tan{\left (e + f x \right )}\right )^{p}}{\sin{\left (e + f x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \tan \left (f x + e\right )\right )^{p}}{a \sin \left (f x + e\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]